package com.project.frba.bi.queueing.mappers;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

public class PropertyValueRowMapper implements RowMapper{
	
	Class propertyType;
	
	public PropertyValueRowMapper(Class propertyType){
		this.propertyType = propertyType;
	}

	public Object mapRow(ResultSet resultSet, int index) throws SQLException {
		String value = propertyType.cast(resultSet.getObject(1)).toString();
		
		return value;
	}
}
